<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<!DOCTYPE html>
<html>
<head>
<jsp:include page="title.jsp"/>
<meta charset="utf-8"/>
 <meta name="keywords" content="贷款，信用贷，分期，借款，万八千，信用借款，借款5000元，小额现金贷" />
  <meta name="description" content="万八千提供快速的小额借款服务。可以借款5000元、无抵押、无担保、万八千是一款针对成人白领市场的消费金融产品，通过互联网、大数据等科技手段，为用户提供短期的信用借贷，解决用户资金周转问题。"/>
<link href="css/style.css" rel="stylesheet"/>
<link rel="stylesheet" type="text/css" href="css/normalize.css" />
<link rel="stylesheet" type="text/css" href="css/default.css">
<link href="css/jquery.ui.datepicker.css" rel="stylesheet" type="text/css" />
<script src="js/jqbase.js"></script>
<script src="myjs/role.js"></script>
<script src="myjs/gy.js"></script>
</head>
<body style="background:#eaedf1;">
<jsp:include page="top.jsp"/>
<div class="backstage no-mar">
		<div class="tab_ul">
	<!-- 	<form action="insertWhite" method="post"> -->
			<div class="tab_cont" style="display:block">
				<dl>
				  
					<input type="hidden" style="height:30px;" value="${adminId}" id="c" name="adminId"/>
					<!-- <dd><span>用户ID：</span><input style="height:30px;" name="userId"/><em></em></dd> -->
					<dd><span>用户手机号:</span><input style="height:30px;" id="a" name="loanMobile"/><em></em></dd>
					<dd><span>姓名:</span><input style="height:30px;" id="b" name="userName"/><em></em></dd>
				</dl>
				<input type="submit" id="d" value="添加">
			</div>
		<!-- 	</form> -->
		</div>
	</div>
<jsp:include page="foot.jsp"/>
<jsp:include page="left.jsp"/>
<script type="text/javascript">
$(function (){
	$("#d").click(function () {
		
		var loanMobile=$("#a").val();
		var userName=$("#b").val();
		var adminId=$("#c").val();
		 if(!(/^1[34578]\d{9}$/.test(loanMobile))){ 
		        alert("手机号码有误，请重填");  
		        return false; 
		    } 
		$.ajax({
			url:'insertWhite',
			type:'post',
			dataType:'json',
			data:{loanMobile:loanMobile,userName:userName,adminId:adminId},
			success:function(data){
				alert(data.msg);
				if(data.status==0){
					window.location.href="sysWhiteList.html";
				}
			},
			error:function(data){
				alert(errMsg);
			}
		})
	})
})

</script> 
</body>
</html>